<template>
  <div class="collection">
    <!-- 标题信息 -->
    <ctitle></ctitle>
    <!-- 内容 -->
    <con :dataList="dataList"></con>
  </div>
</template>
<script>
import ctitle from "@/components/collection/collectioncps/ctitle";
import con from "@/components/collection/collectioncps/_con";
import request from "../../../static/base.js";
export default {
  data() {
    return {
      dataList: []
    };
  },
  components: {
    ctitle,
    con
  },
  created() {
    request({
      url: "?controller=theapi&action=favourite_list",
      method: "get",
      params: {}
    }).then(res => {
      console.log(res);
      if (res.data.data == "没有任何收藏") {
        this.dataList = [];
      } else {
        this.dataList = res.data.data;
      }
    });
  }
};
</script>
<style>
.collection {
  width: 100%;
  background: #f5f6f7;
}
</style>
